<?php

/**
 * Created by PhpStorm.
 * User: xiaoqiang
 * Date: 15-3-21
 * Time: 下午2:12
 */
class LibSession extends LibBase
{

    private $_expire = 0;

    public function __construct__()
    {
        $this->_expire = get_cfg_var("session.gc_maxlifetime");
    }

    static public function run()
    {
        $self = self::getInstance();
        session_set_save_handler(
            array($self, "open"),
            array($self, "close"),
            array($self, "read"),
            array($self, "write"),
            array($self, "destory"),
            array($self, "gc")
        );
        session_start();
    }

    public function open($savePath, $sessionName)
    {
        
        return true;
    }

    public function close()
    {
        return true;
    }

    public function read($sessionID)
    {

    }

    public function write($sessionID, $sessionData)
    {

    }

    public function destory($sessionID)
    {

    }

    public function gc($maxlifetime)
    {

    }
} 